#!/bin/bash

echo "启动 Vue + SpringBoot 项目..."

echo ""
echo "1. 启动后端服务..."
cd backend
gnome-terminal -- bash -c "mvn spring-boot:run; exec bash" &
cd ..

echo ""
echo "2. 启动前端服务..."
cd frontend
gnome-terminal -- bash -c "npm install && npm run dev; exec bash" &
cd ..

echo ""
echo "项目启动完成！"
echo "前端地址: http://localhost:5173"
echo "后端API: http://localhost:8080"
echo ""
echo "按任意键退出..."
read -n 1 